package com.infodms.dms.actions.claim.auditing.rule.custom.elment;

import com.infodms.dms.actions.claim.auditing.ClaimOrderVO;
import com.infodms.dms.po.TcCodePO;
import com.infodms.dms.po.TtAsWrApplicationPO;
import com.infodms.dms.util.CommonUtils;

/**
 * 索赔授权项：产地
 * @author XZM
 */
public class Element12 extends AbstractElement {

	/**
	 * 产地
	 * 注：现在授权项中保存的是产地中文
	 */
	@Override
	public Object getElementValue(ClaimOrderVO orderVO) {
		
		String region = "";
		String yieldly = "";
		TtAsWrApplicationPO claimPO = orderVO.getClaimPO();
		if(claimPO==null)
			return region;
		else
			yieldly = claimPO.getYieldly();
		
		//查询产地中文名称
		if(yieldly==null || "".equals(yieldly)) yieldly = "-1";
		TcCodePO codePO = CommonUtils.findTcCodeDetailByCodeId(Integer.parseInt(yieldly));
		if(codePO!=null)
			region = codePO.getCodeDesc();
		
		return region;
	}

}
